{% extends "base.jinja" %}

{% block title %}{{user_home}}的个人空间{% endblock %}
{% block keywords %}{{user_home}},{{site_options.keyword}}{% endblock %}
{% block description %}{{user_home}}的个人空间{% endblock %}

{% block css %},user.css{% endblock %}

{% block main %}
    {%- include 'user/head.jinja' -%}
    
    <div class="share page" id="share">
        <div class="u-crumb">
            <h3>{{album_data.name}}</h3>
            {% if is_home %}
                <a class="uha-create" id="uha-create" href="javascript:;">创建灵感板</a>
            {% endif %}
            <a class="uha-back" href="{{domain}}u/{{user_home.id}}/album/all/">返回</a>
        </div>

        {% if album_share_data %}
            <ul>
                {% for share in album_share_data.share %}
                    <li data-mid="{{share.cover_id}}">
                        <a target="_blank" class="s-link" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" {% if loop.index0 >= 12 and share.background %}style="background:{{share.background}};opacity:0.5;"{% endif %}>
                        {% if loop.index0 < 12 %}
                            <img alt="{{share.title}}" src="{{share.cover}}!260" width="260" />
                        {% else %}
                            <img alt="{{share.title}}" src="http://s.lovewith.me/static/images/blank.gif" data-src="{{share.cover}}!260" height="260" width="260"/>
                        {% endif %}
                        </a>
                        {% if share.is_video %}
                            <span class="ui ed-video" data-video="{{share.video}}"></span>
                        {% endif %}
                        <div class="s-ext">
                            <p title="{{share.title|forceescape}}"><a target="_blank" href="/share/detail/all/{{share.share_id}}/#m{{share.cover_id}}">{{share.title|safe|cut_str(32)}}</a></p>
                            <span class="s-ext-img">{{share.count}}P</span>
                        </div>
                        {% if share.reserve %}
                        <a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-reserve"></a>
                        {% else %}
                            {% if share.sale_data %}
                            <a target="_blank" href="{{domain}}share/detail/all/{{share.share_id}}/#m{{share.cover_id}}" class="ui s-sale"></a>
                            {% endif %}
                        {% endif %}
                    </li>
                {% endfor %}
            </ul>
            <div class="s-more"><a href="javascript:;" data-scroll="1" data-page="1" id="s-more-btn" data-action="/u/ajax/get/album_share/?aid={{album_data.id}}">更多..</a></div>
        {% else %}
            <div class="s-nodata">
                <p>没有灵感</p>
                <a class="inp-btn-pk" href="{{domain}}">去首页</a>
            </div>
        {% endif %}
    </div>
{% endblock %}

{% block script %}
<script>seajs.use('page/album/create', function(m){if($('#uha-create').size() > 0){new m({element: $('#uha-create')}).setup()}});</script>
{% endblock %}